-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate with Fetch Metadata. #993
Conversation
This patch integrates Fetch Metadata processing into Fetch's "main fetch" algorithm, and defines a "user activation flag" on requests that will be populated during HTML's "process a navigate fetch" algorithm. Closes #885.
As discussed on public-webappsec@. WDYT, @annevk? |
Coming back to this as a prereq to whatwg/html#5203. WDYT? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As Yoav once discovered, this does not work. As https://fetch.spec.whatwg.org/#cors-unsafe-request-header-names is currently invoked, setting Sec-
headers before the network layer forces a preflight. We'd have to add an exception there (or its caller).
I think there is agreement that adding an exception is fine, provided the Sec-
headers have reasonable restrictions on length and attacker-controlled data. (Perhaps we ought to document that in the process of enshrining this exception.)
Would you like me to put these headers specifically into https://fetch.spec.whatwg.org/#cors-safelisted-request-header? Or would you like us to work out a |
I think we should carve it out generically, right? Now actually copying @yoavweiss so he can share any thoughts as to why carving out |
Would you like me to carve it out generically in this CL, or in a separate patch? Probably the latter, right? #1000 |
This also does not address w3c/webappsec-fetch-metadata#29 as far as I can tell. We need a solution for that. Also, w3c/webappsec-fetch-metadata#38 changed right as this PR would expose them to service workers? Could you maybe do another triage round so I know what upstream issues might end up impacting Fetch still? |
I merged the last few months of changes in f780097, and moved the integration out of "main fetch" and into "HTTP-network-or-cache" fetch in 58d9d18. I believe that addresses the following concerns:
I've skimmed very quickly through other bugs, but nothing other than whatwg/html#5203 jumps out at me as needing to be resolved before landing this integration. I'll try to label things accordingly if I can find some time. WDYT? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for getting around to updating this. The plan looks good to me, I only have nits.
I've also added the pull request template to OP as this is a normative change. Mainly so we can find tests and bugs later. I think this has support from Chrome/Firefox. Maybe @youennf can weigh in for Safari? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this looks good, thanks.
Based on feedback in whatwg/fetch#993.
Updated dependent PRs and specs, and filled out the template above. |
As requested in whatwg/fetch#993. Change-Id: Ie6096154ad9f6af73e2c26e0bb0c8f72a2a7a99a
As requested in whatwg/fetch#993. Change-Id: Ie6096154ad9f6af73e2c26e0bb0c8f72a2a7a99a
As requested in whatwg/fetch#993. Change-Id: Ie6096154ad9f6af73e2c26e0bb0c8f72a2a7a99a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2727263 Reviewed-by: Matt Falkenhagen <[email protected]> Commit-Queue: Mike West <[email protected]> Cr-Commit-Position: refs/heads/master@{#859345}
As requested in whatwg/fetch#993. Change-Id: Ie6096154ad9f6af73e2c26e0bb0c8f72a2a7a99a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2727263 Reviewed-by: Matt Falkenhagen <[email protected]> Commit-Queue: Mike West <[email protected]> Cr-Commit-Position: refs/heads/master@{#859345}
As requested in whatwg/fetch#993. Change-Id: Ie6096154ad9f6af73e2c26e0bb0c8f72a2a7a99a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2727263 Reviewed-by: Matt Falkenhagen <[email protected]> Commit-Queue: Mike West <[email protected]> Cr-Commit-Position: refs/heads/master@{#859345}
Thanks @mikewest! |
Unfortunately, I just realized I forgot to note whatwg/html#5203 in the commit message. Oh well. |
In order to support Fetch Metadata Request Headers's Sec-Fetch-User header, this sets navigation request's user-activation if the navigation is triggered while the source browsing context has transient activation. See also whatwg/fetch#993.
…ible in service workers., a=testonly Automatic update from web-platform-tests WPT: `Sec-Fetch-*` headers aren't accessible in service workers. As requested in whatwg/fetch#993. Change-Id: Ie6096154ad9f6af73e2c26e0bb0c8f72a2a7a99a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2727263 Reviewed-by: Matt Falkenhagen <[email protected]> Commit-Queue: Mike West <[email protected]> Cr-Commit-Position: refs/heads/master@{#859345} -- wpt-commits: df6a144d964283f2929eeb937af2806d9aafec62 wpt-pr: 27857
…ible in service workers., a=testonly Automatic update from web-platform-tests WPT: `Sec-Fetch-*` headers aren't accessible in service workers. As requested in whatwg/fetch#993. Change-Id: Ie6096154ad9f6af73e2c26e0bb0c8f72a2a7a99a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2727263 Reviewed-by: Matt Falkenhagen <falkenchromium.org> Commit-Queue: Mike West <mkwstchromium.org> Cr-Commit-Position: refs/heads/master{#859345} -- wpt-commits: df6a144d964283f2929eeb937af2806d9aafec62 wpt-pr: 27857 UltraBlame original commit: cc8aa5885f9fc1c5d8b014047501861d5af169e6
…ible in service workers., a=testonly Automatic update from web-platform-tests WPT: `Sec-Fetch-*` headers aren't accessible in service workers. As requested in whatwg/fetch#993. Change-Id: Ie6096154ad9f6af73e2c26e0bb0c8f72a2a7a99a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2727263 Reviewed-by: Matt Falkenhagen <falkenchromium.org> Commit-Queue: Mike West <mkwstchromium.org> Cr-Commit-Position: refs/heads/master{#859345} -- wpt-commits: df6a144d964283f2929eeb937af2806d9aafec62 wpt-pr: 27857 UltraBlame original commit: cc8aa5885f9fc1c5d8b014047501861d5af169e6
…ible in service workers., a=testonly Automatic update from web-platform-tests WPT: `Sec-Fetch-*` headers aren't accessible in service workers. As requested in whatwg/fetch#993. Change-Id: Ie6096154ad9f6af73e2c26e0bb0c8f72a2a7a99a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2727263 Reviewed-by: Matt Falkenhagen <falkenchromium.org> Commit-Queue: Mike West <mkwstchromium.org> Cr-Commit-Position: refs/heads/master{#859345} -- wpt-commits: df6a144d964283f2929eeb937af2806d9aafec62 wpt-pr: 27857 UltraBlame original commit: cc8aa5885f9fc1c5d8b014047501861d5af169e6
After whatwg/fetch#948, whatwg/fetch#993, and whatwg/html#5203, the integration with Fetch and HTML is complete. This patch points to those integration points rather than claiming that there's still work to be done. Closes #73.
After whatwg/fetch#948, whatwg/fetch#993, and whatwg/html#5203, the integration with Fetch and HTML is complete. This patch points to those integration points rather than claiming that there's still work to be done. Closes #73.
As requested in whatwg/fetch#993. Change-Id: Ie6096154ad9f6af73e2c26e0bb0c8f72a2a7a99a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2727263 Reviewed-by: Matt Falkenhagen <[email protected]> Commit-Queue: Mike West <[email protected]> Cr-Commit-Position: refs/heads/master@{#859345} GitOrigin-RevId: 371392c37dfd0b6830aba1b3648dbfcaab5ff1af
This patch integrates Fetch Metadata processing into Fetch's "main
fetch" algorithm, and defines a "user activation flag" on requests that
will be populated during HTML's "process a navigate fetch" algorithm.
Closes #885.
Sec-Fetch-*
headers aren't accessible in service workers. web-platform-tests/wpt#27857.(See WHATWG Working Mode: Changes for more details.)
Preview | Diff